package com.cj.factory;

import okhttp3.OkHttpClient;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author cc
 * @date 2025-05-12 16:19
 **/

public class Demo01 {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");



//        ctx.get
        OkHttpClient client = ctx.getBean("client2",OkHttpClient.class);
        OkHttpClient client3 = ctx.getBean("client3",OkHttpClient.class);


        Object bean = ctx.getBean("&client3");


        System.out.println("client = " + client);
        System.out.println("client3 = " + client3);
        System.out.println("bean = " + bean);
    }
}
